#ifndef __COMMON_H__
#define __COMMON_H__

typedef struct {
    float x, y;
} point_t;

typedef struct com_cam_param_t {
    double QW, QX, QY, QZ;
    double TX, TY, TZ;
    double k0, k1, k2;
    /*----------------------------------------------
     * simple_pinhole: k0 = k1 = focal
     *        pinhole: k0 = focal_x  k1 = focal_y
     * radial_fisheye: k0-k2 => kc[3], not used now
    ------------------------------------------------*/
    int    width, height;
} com_cam_param_t;

typedef struct com_cam_t {
    double   matrix_c_2_w[4][4];     // Ïà»ú×ø±êÏµµ½ÊÀ½ç×ø±êÏµ×ª»»¾ØÕó
    double   matrix_w_2_c[4][4];     // ÊÀ½ç×ø±êÏµµ½Ïà»ú×ø±êÏµ×ª»»¾ØÕó
    double   fx;                     // Ïà»úx½¹¾à
    double   fy;                     // Ïà»úy½¹¾à
    double   width;                  // Ïà»ú²É¼¯¿í¶È
    double   height;                 // Ïà»ú²É¼¯¸ß¶È
} com_cam_t;

typedef struct com_point_t {
    double x, y, z;
} com_point_t;

typedef struct com_vector_t {
    double x, y, z;
} com_vector_t;

typedef struct {
    float x, y, w, h;
} rect_t;


#endif
